import Vue from 'vue'
import Vuex from 'vuex'
import persistedState from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    username: '',
    mobile: ''
  },
  mutations: {
    saveUserName(state, username) {
      state.username = username
    },
    saveUserMobile(state, mobile) {
      state.mobile = mobile
    }
  },
  actions: {},
  modules: {},
  plugins: [persistedState()]
})
